<template>
    <view>
        <view class="title">{{title}}</view>
        <view class="content_card" v-for="info in infoArr" :key="info.name">
            <view class="content_line">
                <text class="">{{info.name}}</text>
                <text class="">{{info.time}}</text>
            </view>
            <view class="content_line">
                <text class="">公司</text>
                <text class="">{{info.company}}</text>
            </view>
            <view class="content_line">
                <text class="">职责</text>
                <text class="">{{info.work}}</text>
            </view>
            <view class="content_line">
                <text class="">技术</text>
                <text class="">{{info.tools}}</text>
            </view>
            <view class="content_job" @click="v_click(info.job)" @longpress="v_longclick(info.job)">
                <rich-text class="" :nodes="info.job"></rich-text>
            </view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {

            };
        },
        props: {
            title: String,
            infoArr: Array,
        },
        onReady: function() {
            // console.log(this.infoMap)
        },
        methods: {
            v_longclick(v) {
                uni.setClipboardData({
                    data: v,
                });
                uni.showToast({
                    duration: 2000,
                    title: "复制成功",
                    icon: "success",
                })
            },
            v_click(v) {
                uni.navigateTo({
                    url: "../urlsee/urlsee?see=" + v
                })
            }
        }
    }
</script>

<style lang="scss">
    .title {
        padding: 20upx 0upx 5upx 0upx;
        color: gray;
    }

    .content_card {
        background-color: white;
        color: black;
        border-top: 1px solid lightgray;
        border-bottom: 1px solid lightgray;
        margin: 0upx -40upx;
        padding: 0px 20px;
        border-bottom: 10upx;
        padding-bottom: 40upx;
    }

    .content_line {
        line-height: 1.6rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        border-bottom: 1px solid lightgray;
    }

    .content_card>.content_line:nth-child(1) {
        background-color: rgba(0, 255, 0, 0.1);
    }

    .content_line>text:nth-child(2) {
        color: gray;
    }

    .content_line>text:nth-child(1) {
        font-weight: bold;
    }

    .content_line:nth-last-child(1) {
        border-bottom: 0px;
    }

    .content_job {
        line-height: 1.4rem;
        // padding-left: 40upx;
        color: gray;
        // padding-bottom: 40upx;
    }
</style>
